<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
<import type="js" file="js.jquery" />
<import type="js" file="js.common" />
<import type="css" file="css.global" />
</head>
<body>
<div class="search">
	<b>数字证书管理</b>
</div>
<div class="list">
<table class="stripe" cellspacing="0">
    <thead>
        <tr>
        	<th style="min-width: 30px;"><input type="checkbox" name="checkid" onclick="if(this.checked==true) { checkAll('key[]'); } else { clearAll('key[]'); }" ></th>
            <th width="10%">用户名</th>
            <th width="12%">姓名</th>
            <th width="11%">部门</th>
            <th width="20%">邮箱</th>
            <th width="15%">证书签发</th>
            <th width="30%">操作</th>
        </tr>
    </thead>
 
    <tbody>
      <volist name="data" id="vo" empty="$empty">
        <tr>
        	<td><input type="checkbox" name="key[]" value="{$vo.id}"></td>
            <td>{$vo.user_name}</td>
            <td>{$vo.name}</td>
            <td>{$vo.dept_name}</td>
            <td>{$vo.email|default='---'}</td>
            <td>{$vo.key|default='未签发证书'}</td>
            <td><span class="issued{$vo.id}"><a href="javascript:void(0);" onclick="create({$vo.id})" title="签发新证书" >签发证书</a></span> </td>
        </tr>
      </volist>
    </tbody>
</table>
</div>
<div class="page">{$page}</div>
</body>
<script language="javascript">
$(document).ready(function(){  
	$(".stripe tr").mouseover(function(){    
	  $(this).addClass("over");}).mouseout(function(){   
			$(this).removeClass("over");}) 
  	$(".stripe tr:even").addClass("alt");
}); 
var url = "__APP__/Certificates/";
function create(id){
	$(".issued"+id).html("正在签发，请稍后...");
	$.get( url+"issued?id="+id+"&dept_id="+{$dept_id}, function(data){
		//var data=eval("("+data+")");
		alert(data.info);
		if(data.status == 1){location.reload();}
	} );
}

</script>  
</html>